"""
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    created by lane.chang on '22/02/2022'
    comment: 工程常量以及一些底层类
"""
import datetime

__all__ = [
           "FLOW_RECORD_CODE_COUNTER",
           "TOKEN_TIME",
           "INITIAL_TIME",
           "ASC_SERIES",
           "PHONE_REGEX",
           "ID_NUMBER_REGEX",
           "PARAMETER_NAMES",
           "DEFAULT_VALUE",
           "TIME_PERIOD_REGEX"]

# token过期时间
TOKEN_TIME = 0

# 测评记录编号
FLOW_RECORD_CODE_COUNTER = 'flow_code_counter'

# 系统起始时间点
INITIAL_TIME = datetime.datetime.strptime('2024-01-01 00:00:00', '%Y-%m-%d %H:%M:%S')

# 递增序列
ASC_SERIES = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
              'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
              'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
              'U', 'V', 'W', 'X', 'Y', 'Z']

# 手机号正则规则
PHONE_REGEX = r'^(13[0-9]|14[0|5|6|7|9]|15[0|1|2|3|5|6|7|8|9]|16[2|5|6|7]|17[0|1|2|3|5|6|7|8]|18[0-9]|19[1|3|5|6|7|8|9])\d{8}$'
ID_NUMBER_REGEX = r'^\d{17}[\dXx]$'
TIME_PERIOD_REGEX = r'^(\d{2}:\d{2})~(\d{2}:\d{2})$'

# 框架预定义参数名称
PARAMETER_NAMES = ('request', 'session', 'rds', 'body_params', 'operator')

# 默认值，用于区分接口该字段是否传入
DEFAULT_VALUE = '***'

